#ifndef __BSP_GPIO_ALT_H__
#define __BSP_GPIO_ALT_H__

#ifdef __cplusplus
extern "C" {
#endif

typedef enum _BSP_GPIO_DIRECTION_e_
{
    BSP_GPIO_DIRECTION_IN = 0,
    BSP_GPIO_DIRECTION_OUT,
    BSP_GPIO_DIRECTION_OUT_LOW,
    BSP_GPIO_DIRECTION_OUT_HIGH,

    BSP_GPIO_DIRECTION_MAX,
}BSP_GPIO_DIRECTION_e;

typedef enum _BSP_GPIO_LEVEL_e_
{
    BSP_GPIO_LEVEL_LOW = 0,
    BSP_GPIO_LEVEL_HIGH,

    BSP_GPIO_LEVEL_MAX,
}BSP_GPIO_LEVEL_e;

ULONG BspGpio_SetGpioExport(IN UINT32 gpio);
ULONG BspGpio_SetGpioUnexport(IN UINT32 gpio);
ULONG BspGpio_SetGpioDirect(IN UINT32 gpio, IN BSP_GPIO_DIRECTION_e enDirect);
ULONG BspGpio_GetGpioDirect(IN UINT32 gpio, INOUT BSP_GPIO_DIRECTION_e *penDirect);
ULONG BspGpio_SetGpioValue(IN UINT32 gpio, IN BSP_GPIO_LEVEL_e val);
ULONG BspGpio_GetGpioValue(IN UINT32 gpio, INOUT BSP_GPIO_LEVEL_e *penVal);
ULONG BspGpio_SetGpioPull(IN UINT32 gpio, IN BOOL pull_enable);
ULONG BspGpio_GetGpioPull(IN UINT32 gpio, IN BOOL *penpull_enable);
ULONG BspGpio_SetGpioActiveLow(IN UINT32 gpio, IN BSP_GPIO_LEVEL_e enLevel);
ULONG BspGpio_GetGpioActiveLow(IN UINT32 gpio, IN BSP_GPIO_LEVEL_e *penLevel);

#ifdef __cplusplus
}
#endif

#endif
